package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type AlibabaServicecenterWorkcardServiceprogressUpdateRequest struct {
	/*
	   工单id     */
	WorkcardId *int64 `json:"workcard_id" required:"true" `
	/*
	   图片列表     */
	PicUrlList *[]string `json:"pic_url_list,omitempty" required:"false" `
	/*
	   扩展参数     */
	ExtendInfo *map[string]interface{} `json:"extend_info,omitempty" required:"false" `
	/*
	   请求节点的动作描述，唯一标识一个节点     */
	Action *string `json:"action" required:"true" `
	/*
	   真实服务商nick，仅限isv服务商调用时使用     */
	RealTpNick *string `json:"real_tp_nick,omitempty" required:"false" `
}

func (s *AlibabaServicecenterWorkcardServiceprogressUpdateRequest) SetWorkcardId(v int64) *AlibabaServicecenterWorkcardServiceprogressUpdateRequest {
	s.WorkcardId = &v
	return s
}
func (s *AlibabaServicecenterWorkcardServiceprogressUpdateRequest) SetPicUrlList(v []string) *AlibabaServicecenterWorkcardServiceprogressUpdateRequest {
	s.PicUrlList = &v
	return s
}
func (s *AlibabaServicecenterWorkcardServiceprogressUpdateRequest) SetExtendInfo(v map[string]interface{}) *AlibabaServicecenterWorkcardServiceprogressUpdateRequest {
	s.ExtendInfo = &v
	return s
}
func (s *AlibabaServicecenterWorkcardServiceprogressUpdateRequest) SetAction(v string) *AlibabaServicecenterWorkcardServiceprogressUpdateRequest {
	s.Action = &v
	return s
}
func (s *AlibabaServicecenterWorkcardServiceprogressUpdateRequest) SetRealTpNick(v string) *AlibabaServicecenterWorkcardServiceprogressUpdateRequest {
	s.RealTpNick = &v
	return s
}

func (req *AlibabaServicecenterWorkcardServiceprogressUpdateRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.WorkcardId != nil {
		paramMap["workcard_id"] = *req.WorkcardId
	}
	if req.PicUrlList != nil {
		paramMap["pic_url_list"] = util.ConvertBasicList(*req.PicUrlList)
	}
	if req.ExtendInfo != nil {
		paramMap["extend_info"] = util.ConvertStruct(*req.ExtendInfo)
	}
	if req.Action != nil {
		paramMap["action"] = *req.Action
	}
	if req.RealTpNick != nil {
		paramMap["real_tp_nick"] = *req.RealTpNick
	}
	return paramMap
}

func (req *AlibabaServicecenterWorkcardServiceprogressUpdateRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
